package com.itjiange.service.judge.controller.inner;

import com.itjiange.model.entity.QuestionSubmit;
import com.itjiange.service.client.JudgeFeignClient;
import com.itjiange.service.judge.service.JudgeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ItJianGe
 * @data 2024/4/8 11:26
 */
@RestController
@RequestMapping("/inner")
public class JudgeController implements JudgeFeignClient {

    @Resource
    private JudgeService judgeService;

    @Override
    @GetMapping("/do/{id}")
    public QuestionSubmit doQuestion(@PathVariable("id") long id) {
        return judgeService.doQuestion(id);
    }
}
